home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Glitch Apple Disk Collection
/
2014.glitch.apple.collection.zip
/
indexed
/
FLASHCOM.DSK
/
MAZE FLASH VERSION.int
< prev
next >
Wrap
Text File
|
2014-09-09
|
3KB
|
62 lines
4 POKE -16300,0
5 DIM QWE(2):QWE=1:QWE(0)=2:IF QWE=1 THEN 10
6 CALL -936:VTAB 15:PRINT "THIS PROGRAM ONLY WORKS IF COMPILED":VTAB 17:PRINT "BY FLASH! BECAUSE OF THE USE OF"
7 VTAB 19:PRINT "THE EXTENDED LANGUAGE FEATURES":VTAB 21:PRINT "OF THE FLASH! COMPILER.":VTAB 23:PRINT :PRINT :PRINT :PRINT
8 PRINT "USE AN OBJECT FILE AND SET THE":PRINT "PROGRAM ORIGIN TO $4000.":END
10 TEXT :CALL -936:VTAB 10:TAB 10:PRINT "MAZE GENERATOR 2.2":TAB 13:PRINT "BY BOBBY DEEN"
11 VTAB 15:PRINT "THIS PROGRAM WILL DRAW HI-RES MAZES.":PRINT "YOU MUST GIVE THE HORIZONTAL AND"
12 PRINT "VERTICAL (H AND V) SIZE OF THE MAZE.":PRINT :INPUT "MAZE SIZE (H,V) ",H,V:PRINT
20 IF NOT (H>55 OR V>37) THEN 40
30 PRINT "<CTRL-G>LARGEST SIZE IS 55X37<CTRL-G>":FOR I=1 TO 1000:NEXT I:GOTO 51
40 IF NOT (H<2 OR V<2) THEN 55
50 PRINT "<CTRL-G>SMALLEST SIZE IS 2X2<CTRL-G>":FOR I=1 TO 1000:NEXT I
51 REM .WAIT 1500
52 GOTO 10
55 REM .HGR :FULL
60 DIM SX(1650),SY(1650),M((H+2)*(V+2)),UN(4)
65 FOR I=0 TO (H+2)*(V+2):M(I)=0:NEXT I
80 FOR I=0 TO H+1:M(I)=1:M(I+(V+1)*(H+2))=1:NEXT I:FOR I=0 TO V+1:M(I*(H+2))=1:M(H+1+I*(H+2))=1:NEXT I
100 REM .HCOLOR=3
101 FOR I=3 TO H*5+3 STEP 5
102 REM .HPLOTI,3TOI,V*5+3
103 NEXT I
110 FOR I=3 TO V*5+3 STEP 5
111 REM .HPLOT3,ITOH*5+3,I
112 NEXT I
120 I= RND (2)*(H-1)+1:J= RND (2)*(V-1)+1:SP=0:LS=0:LX=0:LY=0:GOSUB 1000
130 M(I+J*(H+2))=1
140 SX(0)=I:SY(0)=J
150 FOR Z=1 TO 4:UN(Z)=0:NEXT Z
160 Z=1:IF M(I+(J-1)*(H+2))#0 THEN 170:UN(Z)=1:Z=Z+1
170 IF M(I-1+J*(H+2))#0 THEN 180:UN(Z)=2:Z=Z+1
180 IF M(I+(J+1)*(H+2))#0 THEN 190:UN(Z)=3:Z=Z+1
190 IF M(I+1+J*(H+2))#0 THEN 200:UN(Z)=4:Z=Z+1
200 IF Z=1 THEN GOTO 240
220 R=UN( RND (Z-1)+1)
230 SP=SP+1:GOSUB 1500:GOSUB 1100:M(I+J*(H+2))=1:SX(SP)=I:SY(SP)=J:GOTO 160
240 SP=SP-1:IF SP>0 THEN 250:I=LX:J=LY:GOSUB 1000:END
250 I=SX(SP):J=SY(SP)
260 IF SP<=LS THEN 270:LS=SP+1:LX=SX(LS):LY=SY(LS)
270 REM .HCOLOR=3:HPLOTI*5,J*5
280 FOR D=1 TO 25:NEXT D
290 REM .HCOLOR=0:HPLOTI*5,J*5
300 GOTO 160
310 END
1000 REM .HCOLOR=3:HPLOTI*5-1,J*5-1TOI*5+2,J*5+2:HPLOTI*5-1,J*5+2TOI*5+2,J*5-1
1010 RETURN
1100 IF R#1 THEN 1110:J=J-1:R=3:RETURN
1110 IF R#2 THEN 1120:I=I-1:R=4:RETURN
1120 IF R#3 THEN 1130:J=J+1:R=1:RETURN
1130 IF R#4 THEN 1140:I=I+1:R=2:RETURN
1140 PRINT "WHOA!":END
1500 REM .HCOLOR=0
1510 IF R#1 THEN 1520:REM .HPLOTI*5-1,J*5-2TOI*5+2,J*5-2
1511 RETURN
1520 IF R#2 THEN 1530:REM .HPLOTI*5-2,J*5-1TOI*5-2,J*5+2
1521 RETURN
1530 IF R#3 THEN 1540:REM .HPLOTI*5-1,J*5+3TOI*5+2,J*5+3
1531 RETURN
1540 IF R#4 THEN 1550:REM .HPLOTI*5+3,J*5-1TOI*5+3,J*5+2
1541 RETURN
1550 PRINT "<CTRL-G><CTRL-G>STOP":END